from pydantic import BaseModel
from typing import List, Dict
from openai import Agent

class ClassDiagramDSL(BaseModel):
    classes: List[Dict[str, any]]
    relationships: List[Dict[str, any]]

agent_class_diagram = Agent(
    name="ClassDiagramGenerator",
    instructions="从需求描述中提取概念类及其关系，生成类图DSL。",
    output_type=ClassDiagramDSL,
    model="gpt-4o"
)